public class
test {

    public static void main(String[] args) {
//        System.out.println(Integer.toHexString(0xFF));
//
        String str="0102034nnnnnnnnnnnnnnnnnnnnnnffff";
        String s = str.substring(6);

        System.err.println(s);


        System.out.println(s.substring(0,s.length()-4));
        System.out.println(str.length());
        byte[] bytes={1,2,3,};
        System.out.println(bytesToHexString(bytes));

    }
    public static String bytesToHexString(byte[] bytes) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < bytes.length; i++) {
            String hex = Integer.toHexString(0xFF & bytes[i]);
            if (hex.length() == 1) {
                sb.append('0');
            }
            sb.append(hex);
        }
        return sb.toString();
    }
}
